
ifeq ($(GOOS),windows)
	suffix=.exe
endif

all: elecpower

elecpower: ../obj/elecpower.8
	8l -L ../lib -o ../bin/$@$(suffix) $<
ifeq ($(GOOS),windows)
	python ../tools/repgui.py ../bin/$@$(suffix)
endif
	
../obj/elecpower.8: *.go modes/*.go ../lib/core.a
	8g -I ../lib -o ../obj/$@ *.go modes/*.go 

../lib/core.a:
	make -C core
	make -C core copylib
	
clean:
	rm -f ../obj/*.8 ../bin/elecpower$(suffix)
	make -C core clean
